<?php

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use frontend\assets\AppAsset;

AppAsset::register($this);

$this->registerCss("
    .myfooter{padding: 15px 12%;background: #3A414E;color:#fff;display: flex;align-items:center;}
    .header{width:100%;height:80px;position: fixed;left:0px;top:0px;display: flex;align-items: center;z-index: 99999;padding: 0px 12%;}
    .header .logo{height:100px}
    .header .header-cont{display: flex;align-items: center;text-align: center;}
    .header .header-cont a{text-decoration: none;color:#fff;font-size: 16px}
    .active{background:rgba(255,255,255,0.2);padding: 10px 20px}
");
$setting = Yii::$app->setting;
$home_url = Yii::$app->request->getHostInfo();
$controller = Yii::$app->controller->id;
$action = Yii::$app->controller->action->id;
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="<?=$setting->get('site_keyword')?>">
    <meta name="Description" content="<?=$setting->get('site_description')?>">
    <?php $this->registerCsrfMetaTags() ?>
    <title><?=$setting->get('site_title')?></title>
    <?php $this->head() ?>
</head>
<body>
<?php $this->beginBody() ?>

<div class="header">
    <div style="flex: 1;">
        <a href="/"><img class="logo" src="https://other3.oss-cn-beijing.aliyuncs.com/13network/logo.png"></a>
    </div>
    <div style="flex: 1">
        <div class="header-cont">
            <div style="flex: 1">
                <a href="/" class=" <?=$action == 'index'?'active':''?>">首页</a>
            </div>
            <div style="flex: 1">
                <a href="#">开发案例</a>
            </div>
            <div style="flex: 1">
                <a href="/home/default/price" class="<?=$action=='price'?'active':''?>">价格优势</a>
            </div>
            <div style="flex: 2">
                <a href="#">
                    <div style="display: flex;align-items: center;text-align: center;display: none">
                        <div style="flex: 1;text-align: right;">
                            <img src="https://other3.oss-cn-beijing.aliyuncs.com/13network/dianhua2x.png" style="width:36px">
                        </div>
                        <div style="flex: 1">
                            <p style="font-size: 14px;margin-bottom: 0px">全国咨询电话:</p>
                            <p style="margin-bottom: 0px"><?=$setting->get('contact_phone')?></p>
                        </div>
                    </div>
                </a>
            </div>
        </div>
    </div>
</div>

<div class="">
    <?= $content ?>
</div>

<div class="myfooter">
    <div class="" style="flex: 1;text-align: left;">
        版权所有@<?=$setting->get('site_banquan_one')?>
    </div>
    <div style="flex: 1;text-align: right;">
        <?php if($home_url == 'http://www.31network.cn'){?>
            <a class="beian" href="http://www.beian.miit.gov.cn" style="color: #fff;">备案号：<?=$setting->get('site_beian_one')?></a>
        <?php }else{ ?>

            <a class="beian" href="http://www.beian.miit.gov.cn" style="color: #fff;">备案号：<?=$setting->get('site_beian_two')?></a>
        <?php }?>
    </div>
</div>

<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>

<script type="text/javascript">
    // 
    $(window).scroll(function(){
        var sc=$(window).scrollTop();
        console.log(sc)
        if(sc>500){
            $(".header").css("background","#3A414E");
            $(".header").css("box-shadow","0 0 10px #fff");
        }else{
            $(".header").css("background","unset");
            $(".header").css("box-shadow","unset");
        }
    });
</script>
